package com.joyintech.base;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;

/**
 * 抽象实体类：无公共字段
 *
 * @author fanglei
 * @date 2021/07/28 15:26
 **/
@Data
public abstract class CommonModel<T extends Model<?>> extends Model<T> {

    @ApiModelProperty(value = "ID")
    @TableId(value = "id", type= IdType.AUTO)
    @NotNull(groups = CommonEntity.Update.class)
    private Long id;

}
